<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>最新消息</title>
<script src="../public/js/j.js" type="text/javascript"></script>
<script src="../public/js/facebox.js" type="text/javascript"></script>
<script src="../public/js/comment.func.js" type="text/javascript"></script>
<link href="../public/style/facebox.css" type="text/css" rel="stylesheet" />
<link href="../public/style/admin.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
jQuery(document).ready(function($) {
    $('a[rel*=facebox]').facebox()
});
</script>
</head>

<body topmargin="30">
<div id="imgbox"></div>
<div align="center">
	<table width="100%" id="table1" cellpadding="5" style="border:1px solid #336699;" cellspacing="1">
		<tr>
			<td colspan="2" bgcolor="#E8F1FF">
			<p align="center" style="padding:5px">
			<font size="2">內容管理系統</font></p></td>
		</tr>      
		<form name="form2" method="post" action="?view=newslist&parameter=search">
		</form>
        <tr style="height:25px">
			<td width="17%" bgcolor="#E8F1FF" align="right">快速新增：</td>
			<td width="80%" class="tab_tds" style="text-align:left"><a href="?view=addimages">新增圖片</a> &nbsp;
			<a href="?view=images">顯示全部圖檔</a></td>
		</tr>
	</table>
	
    <table border="1" width="100%" id="table2" cellspacing="1" cellpadding="3" style="border:1px solid #336699;">
    <form name="form" method="post" action="?action=del_img">
        <tr>
            <td width="5%" class="tab_header_tr">ID</td>
            <td width="23%" class="tab_header_tr">圖片名稱</td>
			<td width="15%" class="tab_header_tr">圖片目录</td>
			<td width="20%" class="tab_header_tr">所屬內容</td>
            <td width="15%" class="tab_header_tr">發布時間</td>
            <td width="8%" class="tab_header_tr">選擇</td>
        </tr>
<?php
		if(empty($assArray[0])){
?>
			<tr class="tab_tr">
				<td class="tab_tds" height="30" colspan="6">您好像還沒有新增過圖片!!</td>
			</tr>
<?php
		}else{
			foreach($assArray[0] as $v)
			{
				$url = $v['tpath'].$v['tname'];
?>
			<tr class="tab_tr">
                <td class="tab_tds"><?php echo $v['tid'];?></td>
                <td class="tab_tds"><a href="<?php echo $url;?>" rel="facebox"><?php echo $v['tname'];?></a></td>
				<td class="tab_tds"><?php echo $v['tpath'];?></td>
				<td class="tab_tds"><a href="?view=images&aid=<?php echo $v['attribute'];?>"><?php echo $v['aname'];?></a></td>
                <td class="tab_tds"><?php echo date("Y-m-d H:i:s",$v['dateline']);?></td>
                <td class="tab_tds">
                <input name="id[]" type="checkbox" id="id" value="<?php echo $v['tid'];?>" onClick="checkItem(this, 'mmAll')" /></td>
            </tr>
<?php
			}
		}
?>
		<tr>
            <td colspan="8" class="tab_tds"><?php echo $assArray[1];?></td>
        </tr>
        <tr>
            <td colspan="8" class="tab_tds">
                <p style="margin-top: 10px; margin-bottom: 10px">	
                <input type="submit" name="Submit" value="刪除所選" onClick="return confirm('您確定真的要刪除嗎？')"> 
                <font size="2">&nbsp; <a href="javascript:;" onclick="selectAll()" style="text-decoration:underline">全選</a> 
                    <a href="javascript:;" onclick="conversely()" style="text-decoration:underline">全不選</font>
                </form>
            </td>
        </tr>
    </table>
</div>
</body>
</html>